package com.ruoyi.common.core.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 资产所有方区域信息对象 ams_own_address
 * 
 * @author yfkj
 * @date 2021-10-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AmsOwnAddress extends com.ruoyi.common.core.web.domain.BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 资产所有方区域信息主键 */
    @TableField(exist = true)
    @ApiModelProperty(value =  "${comment}")
    @TableId(type= IdType.AUTO)
    private Long addressId;
    /** 父地址id */
    @Excel(name = "父地址id")
    @TableField(exist = true)
    @ApiModelProperty(value =  "父地址id")
    private Long parentId;
    /** 祖级列表 */
    @Excel(name = "祖级列表")
    @TableField(exist = true)
    @ApiModelProperty(value =  "祖级列表")
    private String ancestors;
    /** 部门 */
    @Excel(name = "部门")
    @TableField(exist = true)
    @ApiModelProperty(value =  "部门")
    private Long deptId;
    /** 位置名称 */
    @Excel(name = "位置名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "位置名称")
    private String name;
    /** 完整名称 */
    @Excel(name = "完整名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "完整名称")
    private String fullName;
    /** 排序 */
    @Excel(name = "排序")
    @TableField(exist = true)
    @ApiModelProperty(value =  "排序")
    private Integer sortId;
    /** 经度 */
    @Excel(name = "经度")
    @TableField(exist = true)
    @ApiModelProperty(value =  "经度")
    private String longitude;
    /** 维度 */
    @Excel(name = "维度")
    @TableField(exist = true)
    @ApiModelProperty(value =  "维度")
    private String latitude;

    @TableField(exist = false)
    @ApiModelProperty(value =  "子列表")
    private List<AmsOwnAddress> children;


    public static final String ADDRESS_ID="address_id";
    public static final String PARENT_ID="parent_id";
    public static final String ANCESTORS="ancestors";
    public static final String DEPT_ID="dept_id";
    public static final String NAME="name";
    public static final String FULL_NAME="full_name";
    public static final String SORT_ID="sort_id";
    public static final String LONGITUDE="longitude";
    public static final String LATITUDE="latitude";
    public static final String CREATE_BY="create_by";
    public static final String CREATE_TIME="create_time";
    public static final String UPDATE_BY="update_by";
    public static final String UPDATE_TIME="update_time";
    public static final String REMARK="remark";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("addressId", getAddressId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("deptId", getDeptId())
            .append("name", getName())
            .append("fullName", getFullName())
            .append("sortId", getSortId())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
